package com.ff.neuropp.domain;

import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

import com.ff.neuropp.Dto.PageDto;
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ff.neuropp.util.DateSerializer;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@Entity
@Table(name = "t_mentor", uniqueConstraints = {@UniqueConstraint(columnNames="id")})
/**
 * 导师表
 * @author sun_weiwu
 *
 */
public class Mentor extends PageDto {
	 private static final long serialVersionUID = 1L;

	   @Id
	    @GeneratedValue(strategy = GenerationType.IDENTITY)
	    private int id;
	 
	
	    @Column(name = "name")
	    @ApiModelProperty(value = "导师名称")
	    private String name;

		@Column(name = "head_img")
		@ApiModelProperty(value = "导师头像")
		private String headImg;

		@Column(name = "contact")
	    @ApiModelProperty(value = "联系方式")
	    private String contact;

		@Column(name = "email")
		@ApiModelProperty(value = "邮箱")
		private String email;
	    
	    
	    //操作时间
	    @Column(updatable = false)
	    @org.hibernate.annotations.CreationTimestamp
	    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	    @JsonSerialize(using = DateSerializer.class)
	    private Date create_date;
	    
	    @Column(name = "update_time", columnDefinition = "datetime COMMENT '更新时间'")
	    private Date updateTime;
	    
}
